package com.springboot.onlinemusicserver.service;

import com.springboot.onlinemusicserver.model.Music;
import com.springboot.onlinemusicserver.utils.common.Result;
import jakarta.servlet.http.HttpServletRequest;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description :
 * User: jiume
 * Date: 2025-05-26
 * Time: 9:23
 */
public interface MusicLoveService {

    /**
     * 收藏音乐
     * @param musicId 音乐Id
     * @param request 获取当前用户Id
     * @return 是否收藏成功
     */
    Result<Boolean> collectMusicLove(Long musicId, HttpServletRequest request);

    /**
     * 取消收藏
     * @param musicId 音乐Id
     * @param request 获取当前用户Id
     * @return 是否成功取消收藏
     */
    Result<Boolean> cancelMusicLove(Long musicId, HttpServletRequest request);

    /**
     * 查询当前用户所收藏的音乐
     * @param selectName 查询参数
     * @param request 获取当前用户
     * @return 查询结果
     */
    Result<List<Music>> selectMusicLoveList(String selectName, HttpServletRequest request);

}
